/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ViewUsuario.java
 *
 * Created on 19/03/2012, 11:13:41
 */

package com.qp.smsmarketing.view;

import com.qp.smsmarketing.utils.JTextFieldFilter;
import com.qp.smsmarketing.view.mbean.UsuarioMBean;
import com.qp.smsmarketing.view.mbean.UsuarioMBean;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import javax.swing.AbstractButton;
import javax.swing.JOptionPane;

/**
 *
 * @author waldenilson
 */
public class ViewUsuario extends AbstractDialog {

    UsuarioMBean usuariobean = new UsuarioMBean();

    /** Creates new form ViewUsuario */
    public ViewUsuario() {
        initComponents();
        setTitle(".:: Usuarios : SMS-Marketing ::.");
       setLocationRelativeTo(null);

//       tf_nome.setDocument(new JTextFieldFilter(JTextFieldFilter.ALPHA_NUMERIC,50));
//       tf_login.setDocument(new JTextFieldFilter(JTextFieldFilter.ALPHA_NUMERIC,50));
//       tf_senha.setDocument(new JTextFieldFilter(JTextFieldFilter.ALPHA_NUMERIC,32));
//       tf_senha2.setDocument(new JTextFieldFilter(JTextFieldFilter.ALPHA_NUMERIC,32));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bgPapeis = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        tf_nome = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        bt_novo = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        tf_login = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        tf_senha = new javax.swing.JPasswordField();
        tf_senha2 = new javax.swing.JPasswordField();
        jPanel2 = new javax.swing.JPanel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        cbPermissoesUsuarios = new javax.swing.JCheckBox();
        cbPermissoesGrupos = new javax.swing.JCheckBox();
        cbPermissoesContatos = new javax.swing.JCheckBox();
        cbPermissoesMensagens = new javax.swing.JCheckBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        tableUsuario = new javax.swing.JTable();
        jButton3 = new javax.swing.JButton();
        cb_ativo = new javax.swing.JCheckBox();

        setBackground(new java.awt.Color(255, 255, 255));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("USUÁRIOS");

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/qp/smsmarketing/resource/icon/16X16/apply.png"))); // NOI18N
        jButton1.setText("Salvar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel3.setText("Login.:");

        jLabel2.setText("Nome.:");

        bt_novo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/qp/smsmarketing/resource/icon/16X16/add.png"))); // NOI18N
        bt_novo.setText("Novo");
        bt_novo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_novoActionPerformed(evt);
            }
        });

        jLabel4.setText("Senha.:");

        jLabel5.setText("Confirme a senha.:");

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Permissões"));

        bgPapeis.add(jRadioButton1);
        jRadioButton1.setSelected(true);
        jRadioButton1.setText("ADMINISTRADOR");
        jRadioButton1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jRadioButton1StateChanged(evt);
            }
        });
        jRadioButton1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jRadioButton1ItemStateChanged(evt);
            }
        });

        bgPapeis.add(jRadioButton2);
        jRadioButton2.setText("OPERADOR");

        cbPermissoesUsuarios.setSelected(true);
        cbPermissoesUsuarios.setText("Cadastro de Usuários");
        cbPermissoesUsuarios.setEnabled(false);

        cbPermissoesGrupos.setSelected(true);
        cbPermissoesGrupos.setText("Cadastro de Grupos");
        cbPermissoesGrupos.setEnabled(false);

        cbPermissoesContatos.setSelected(true);
        cbPermissoesContatos.setText("Cadastro de Contatos");
        cbPermissoesContatos.setEnabled(false);

        cbPermissoesMensagens.setSelected(true);
        cbPermissoesMensagens.setText("Cadastro de Mensagens");
        cbPermissoesMensagens.setEnabled(false);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jRadioButton1)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton2))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbPermissoesGrupos)
                            .addComponent(cbPermissoesContatos))
                        .addGap(8, 8, 8)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbPermissoesUsuarios)
                            .addComponent(cbPermissoesMensagens))))
                .addContainerGap(136, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton1)
                    .addComponent(jRadioButton2))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbPermissoesGrupos)
                    .addComponent(cbPermissoesMensagens))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbPermissoesContatos)
                    .addComponent(cbPermissoesUsuarios))
                .addContainerGap(26, Short.MAX_VALUE))
        );

        tableUsuario.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Código", "Nome", "Login"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tableUsuario.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableUsuarioMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tableUsuario);

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/qp/smsmarketing/resource/icon/16X16/cancel.png"))); // NOI18N
        jButton3.setText("Sair");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        cb_ativo.setText("Grupo Ativo ?");
        cb_ativo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        cb_ativo.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(cb_ativo)
                .addContainerGap(476, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(tf_senha, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel5)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(tf_senha2, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(174, 174, 174))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(bt_novo)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton3))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tf_nome, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tf_login, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(71, 71, 71))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(tf_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(tf_login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(tf_senha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(tf_senha2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(cb_ativo)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(bt_novo)
                        .addComponent(jButton1)
                        .addComponent(jButton3)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 480, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void bt_novoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_novoActionPerformed

        usuariobean.novoObjeto(this);
        // TODO add your handling code here:
    }//GEN-LAST:event_bt_novoActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

        String res = usuariobean.salvarObjeto(this,usuariobean.jbuttonGroupSelected(getBgPapeis()));

        if ( res.equals("error") )
            JOptionPane.showMessageDialog
                    (null,"Ocorreu um erro em salvar modificações.\nTente novamente.","Erro",2);
        else if(res.equals("verify"))
            JOptionPane.showMessageDialog
                    (null,"Informe todos os dados corretamente..","Erro",2);
        else if(res.equals("equallog"))
            JOptionPane.showMessageDialog
                    (null,"Login já existe.\nCadastre um login diferente.","Erro",2);
        else if(res.equals("role"))
            JOptionPane.showMessageDialog
                    (null,"Erro no nível de permissão.\nTente novamente.","Erro",2);
        else
            usuariobean.buscarCrudUsuario(this);
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed

        
        // TODO add your handling code here:
    }//GEN-LAST:event_formWindowClosed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        dispose();
        // TODO add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed

    private void tableUsuarioMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableUsuarioMouseClicked
        usuariobean.selecionarRegistro(this);
        // TODO add your handling code here:
    }//GEN-LAST:event_tableUsuarioMouseClicked

    private void jRadioButton1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jRadioButton1StateChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButton1StateChanged

    private void jRadioButton1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRadioButton1ItemStateChanged
        if( usuariobean.jbuttonGroupSelected(bgPapeis).equals("ADMINISTRADOR") )
        {
            getCbPermissoesUsuarios().setSelected(true); getCbPermissoesUsuarios().setEnabled(false);
            getCbPermissoesGrupos().setSelected(true); getCbPermissoesGrupos().setEnabled(false);
            getCbPermissoesContatos().setSelected(true); getCbPermissoesContatos().setEnabled(false);
            getCbPermissoesMensagens().setSelected(true); getCbPermissoesMensagens().setEnabled(false);
        }
        else if( usuariobean.jbuttonGroupSelected(bgPapeis).equals("OPERADOR") )
        {
            getCbPermissoesUsuarios().setSelected(false); getCbPermissoesUsuarios().setEnabled(true);
            getCbPermissoesGrupos().setSelected(false); getCbPermissoesGrupos().setEnabled(true);
            getCbPermissoesContatos().setSelected(false); getCbPermissoesContatos().setEnabled(true);
            getCbPermissoesMensagens().setSelected(false); getCbPermissoesMensagens().setEnabled(true);
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButton1ItemStateChanged

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ViewUsuario().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup bgPapeis;
    private javax.swing.JButton bt_novo;
    private javax.swing.JCheckBox cbPermissoesContatos;
    private javax.swing.JCheckBox cbPermissoesGrupos;
    private javax.swing.JCheckBox cbPermissoesMensagens;
    private javax.swing.JCheckBox cbPermissoesUsuarios;
    private javax.swing.JCheckBox cb_ativo;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tableUsuario;
    private javax.swing.JTextField tf_login;
    private javax.swing.JTextField tf_nome;
    private javax.swing.JPasswordField tf_senha;
    private javax.swing.JPasswordField tf_senha2;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the tableUsuario
     */
    public javax.swing.JTable getTableUsuario() {
        return tableUsuario;
    }

    /**
     * @param tableUsuario the tableUsuario to set
     */
    public void setTableUsuario(javax.swing.JTable tableUsuario) {
        this.tableUsuario = tableUsuario;
    }

    /**
     * @return the tf_desc
     */
    
    /**
     * @return the tf_nome
     */
    public javax.swing.JTextField getTf_nome() {
        return tf_nome;
    }

    /**
     * @param tf_nome the tf_nome to set
     */
    public void setTf_nome(javax.swing.JTextField tf_nome) {
        this.tf_nome = tf_nome;
    }

    /**
     * @return the tf_login
     */
    public javax.swing.JTextField getTf_login() {
        return tf_login;
    }

    /**
     * @param tf_login the tf_login to set
     */
    public void setTf_login(javax.swing.JTextField tf_login) {
        this.tf_login = tf_login;
    }

    /**
     * @return the tf_senha
     */
    public javax.swing.JPasswordField getTf_senha() {
        return tf_senha;
    }

    /**
     * @param tf_senha the tf_senha to set
     */
    public void setTf_senha(javax.swing.JPasswordField tf_senha) {
        this.tf_senha = tf_senha;
    }

    /**
     * @return the tf_senha2
     */
    public javax.swing.JPasswordField getTf_senha2() {
        return tf_senha2;
    }

    /**
     * @param tf_senha2 the tf_senha2 to set
     */
    public void setTf_senha2(javax.swing.JPasswordField tf_senha2) {
        this.tf_senha2 = tf_senha2;
    }

    /**
     * @return the cb_ativo
     */
    public javax.swing.JCheckBox getCb_ativo() {
        return cb_ativo;
    }

    /**
     * @param cb_ativo the cb_ativo to set
     */
    public void setCb_ativo(javax.swing.JCheckBox cb_ativo) {
        this.cb_ativo = cb_ativo;
    }

    /**
     * @return the bgPapeis
     */
    public javax.swing.ButtonGroup getBgPapeis() {
        return bgPapeis;
    }

    /**
     * @param bgPapeis the bgPapeis to set
     */
    public void setBgPapeis(javax.swing.ButtonGroup bgPapeis) {
        this.bgPapeis = bgPapeis;
    }

    /**
     * @return the cbPermissoesContatos
     */
    public javax.swing.JCheckBox getCbPermissoesContatos() {
        return cbPermissoesContatos;
    }

    /**
     * @return the cbPermissoesGrupos
     */
    public javax.swing.JCheckBox getCbPermissoesGrupos() {
        return cbPermissoesGrupos;
    }

    /**
     * @return the cbPermissoesMensagens
     */
    public javax.swing.JCheckBox getCbPermissoesMensagens() {
        return cbPermissoesMensagens;
    }

    /**
     * @return the cbPermissoesUsuarios
     */
    public javax.swing.JCheckBox getCbPermissoesUsuarios() {
        return cbPermissoesUsuarios;
    }

    /**
     * @return the bt_novo
     */
    public javax.swing.JButton getBt_novo() {
        return bt_novo;
    }

}
